'use strict';
var clientControllers = angular.module('clientControllers');

clientControllers
    .controller('CmsGalleryCtrl', ['$rootScope', '$scope', '$routeParams',
            'Subscription', 'Galleries', 'Gallery', 'Pictures', 'Picture',
        function ($rootScope, $scope, $routeParams, Subscription, Galleries, Gallery, Pictures, Picture) {
            $scope.showPictureList = function() {
                $scope.galleryContent = 'views/component/gallery/picture-list.html';
                var json = Galleries.find({action: 'bySubId', subId: $rootScope.CurrentSub.id},function() {
                    $scope.gallery = json.data.gallery;
                    $scope.pictures = json.data.pictures;
                });
            }
            $scope.showPictureList();

    }]);




